Developer Documentation

QuickTime 4 API Documentation

Inside Macintosh: QuickTime Components

Previous | Overview | Contents | Next |

Getting the Current Time

Clock components provide a single function that allows the Movie Toolbox to obtain the current time.

ClockGetTime

The ClockGetTime function allows the Movie Toolbox to obtain the current time according to the specified clock.

pascal ComponentResult ClockGetTime (ComponentInstance aClock,
                                          TimeRecord *out);

aClock
Specifies the clock for the operation. You obtain this identifier from the Component Manager's OpenComponent function. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for details.

out
Contains a pointer to a time structure. (For details on the time structure, see the chapter "Movie Toolbox" in Inside Macintosh: QuickTime .) The clock component updates this structure with the current time information. Specifically, the clock component sets the value and scale fields in the time structure. Your clock component should always return values in its native time scale--this time scale does not change during the life of the component connection.

DESCRIPTION

The ClockGetTime function is the most important function for most clock components. The Movie Toolbox calls this function very often, so it should be fast.


© 1999 Apple Computer, Inc.

Previous | Overview | Contents | Next